package com.shanjupay.merchant.api;

import com.shanjupay.common.domain.BusinessException;
import com.shanjupay.merchant.api.dto.AppDTO;

import java.util.List;

/**
 * <h1>商户app相关的服务</h1>
 * @author lsy
 * @date 2020/05/11
 */
public interface AppService {

    /**
     * 商户创建app应用服务
     * @param merchantId 商户ID
     * @param app {@link AppDTO}
     * @return {@link AppDTO}
     * @throws BusinessException
     */
    AppDTO createApp(Long merchantId, AppDTO app) throws BusinessException;

    /**
     * 通过商户ID查询对应商户所有的App应用
     * @param merchantId 商户ID
     * @return {@link AppDTO}
     * @throws BusinessException
     */
    List<AppDTO> queryAppByMerchant(Long merchantId) throws BusinessException;

    /**
     * 根据业务id查询应用
     * @param id app的ID
     * @return {@link AppDTO}
     * @throws BusinessException
     */
    AppDTO getAppById(String id) throws BusinessException;
}
